pid=`ps -ef |grep main|grep -v 'grep' |awk '{print $2}'`
echo $pid
if [ $pid > 0 ];then
	echo 关闭进程ID：$pid
	kill $pid
fi
echo 启动服务...
go build -o main .
echo 启动完成
nohup ./main > out.log 2>&1 &
